<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>课程开设表</title>
<object id="WebBrowser"
	classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height="0" width="0">
</object>
<style type="text/css">
body {
	margin-left: 5px;
	margin-right: 5px;
	margin-top: 10px;
	margin-bottom: 10px;
}

td {
	text-align: center;
	vertical-align: middle;
	background-color: white;
	height: 28px;
	line-height: 28px;
}

#course_table {
	width: 800px;
}

#course_time {
	width: 150px;
}

.PageNext {
	page-break-after: always;
}

<!--
控制分页-->.style8 {
	font-size: medium;
	color: #000066;
}
</style>
<style media=print>
.Noprint {
	display: none;
}
<!--
用本样式在打印时隐藏非打印项目--
>
</style>
</head>
<script language="javascript"> 
function printsetup(){ 

		document.all.WebBrowser.execwb(8,1); 
} 
	function printpreview(){ 
	// 打印页面预览 
	var mStr1,mStr2;   
	mStr1 = document.body.innerHTML ;  
	mStr2= mStr1; 
	var mWindow = window; 
	mWindow.document.body.innerHTML ="<br /><br /><br /><br /><br />"; 
	
	var my = mWindow.document.createElement("hr"); 
	  
    my.setAttribute("height", "0px");  
    my.setAttribute("border", "0px");
    my.setAttribute("border-top", "1px solid #ff1493");
    //添加分割线   
	
	mWindow.document.body.appendChild(my);
	
	var br6 = mWindow.document.createElement("br");
	mWindow.document.body.appendChild(br6);
	var br7 = mWindow.document.createElement("br");
	mWindow.document.body.appendChild(br7);
	var br8 = mWindow.document.createElement("br");
	mWindow.document.body.appendChild(br8);
	var br9 = mWindow.document.createElement("br");
	mWindow.document.body.appendChild(br9);
	var br10 = mWindow.document.createElement("br");
	mWindow.document.body.appendChild(br10);

	mWindow.document.body.innerHTML+=mStr2;
	var lian=mWindow.document.getElementById("lian");
	
	lian.innerHTML="<p>第二联</p>";
	
	lian.setAttribute("id","lian1");
	
	
	mStr2=mWindow.document.body.innerHTML;
	mWindow.document.body.innerHTML=mStr1+mStr2;
	
	mWindow.document.all.WebBrowser.execwb(7,1);   
	window.document.body.innerHTML = mStr1;
	
	} 
	function printit() 
	{ 
	if (confirm("确定打印吗？")) {
		var mStr1,mStr2,mStr3;   
		mStr1 = document.body.innerHTML ;  	
		var mWindow = window;
		
		mStr2=mStr3=mStr1;
		mWindow.document.body.innerHTML="<div id='pageNext1' style='visibility:hidden;'><p class='PageNext'></p></div><br /><br /><br /><br /><br />";
	
		mWindow.document.body.innerHTML +=mStr3; 
		
		var lian=document.getElementById("lian");
		lian.innerHTML="<p>第三联</p>";
		lian.setAttribute("id","lian2");
		mStr3= mWindow.document.body.innerHTML; 
		
			
			
		mWindow.document.body.innerHTML="<br /><br /><br /><br /><br />";
		
	
		var my = mWindow.document.createElement("hr"); 
	  
   		my.setAttribute("height", "0px");  
    	my.setAttribute("border", "0px");
   		my.setAttribute("border-top", "1px solid #ff1493");
   		//添加分割线   
	
		mWindow.document.body.appendChild(my);
	
		var br6 = mWindow.document.createElement("br");
		mWindow.document.body.appendChild(br6);
		var br7 = mWindow.document.createElement("br");
		mWindow.document.body.appendChild(br7);
		var br8 = mWindow.document.createElement("br");
		mWindow.document.body.appendChild(br8);
		var br9 = mWindow.document.createElement("br");
		mWindow.document.body.appendChild(br9);
		var br10 = mWindow.document.createElement("br");
		mWindow.document.body.appendChild(br10);
			
		mWindow.document.body.innerHTML +=mStr2;
			
		lian=document.getElementById("lian");//改变边栏
		lian.innerHTML="<p>第二联</p>"; 
		lian.setAttribute("id","lian1");
			
		mStr2=mWindow.document.body.innerHTML;
		
		mStr3=mStr1+mStr2+mStr3;
		
		mWindow.document.body.innerHTML=mStr2;
		lian=document.getElementById("lian1");//改变边栏
		lian.innerHTML="<p>第四联</p>"; 
		mStr2=mWindow.document.body.innerHTML;
		mWindow.document.body.innerHTML=mStr3+mStr2;
		
		mWindow.document.all.WebBrowser.execwb(6,6);   
		window.document.body.innerHTML = mStr1;			
	} 
} 
</script>
<body>
<?php $course = $data;?>
<?php if($course): ?>	
<?php
	
$dates = explode ( '-', $course->time );
	?>
<div align="center">
		<h2>"拔尖计划"课程开设表<?php if($course->courseType==CourseBean::$_LECTURE) echo '（讲座）';?></h2>
		<form>
			<p> <?php echo date("Y 年 m 月 d 日",strtotime($course->time))?></p>

			<input class="Noprint" type=button name=button_print value="打印" class="noprint" onclick="javascript:printit()"> 
			<input class="Noprint" type=button name=button_setup value="打印页面设置" class="noprint" onclick="javascript:printsetup();"> 
			<input class="Noprint" type=button name=button_show value="打印预览" onclick="javascript:printpreview();">
						<table width="800" border="0" cellpadding="5">
							<tr>
								<td>
									<table id="course_table" border="1" cellpadding="5"
										cellspacing="1" bgcolor="#000000">
										<tr>
											<td width="80px">院系：</td>
											<td width="150px"><?php echo getInstitute($course->department);?></td>
											<td width="80px">课程名：</td>
											<td colspan="2"><?php echo $course->courseName;?></td>
											<td>教师类型：</td>
											<td colspan="2"><?php echo getTeacherType($course->teacherType);?></td>
										</tr>
										<tr>
											<td>教师姓名：</td>
											<td><?php echo $course->teacherName;?></td>
											<td>所在单位：</td>
											<td colspan="2"><?php echo $course->organization;?></td>
											<td>职称：</td>
											<td colspan="2"><?php echo getJobTitle($course->jobTitle);?></td>
										</tr>
										<tr>
											<td><?php echo $course->getFieldAttr()?>：</td>
											<td colspan="2"> <?php echo $course->credential;?></td>
											<td colspan="2">课酬标准：</td>
											<td colspan="3">
											<?php
											echo $course->salaryStandard;
											$attr = $course->getSalaryStandardAttr();
											echo $attr;?></td>
											
										</tr>
										<tr>
											<td>开课时间：</td>
											<td id="course_time"><?php echo date("Y年m月d日",strtotime($course->courseBegin))."至".date("Y年m月d日",strtotime($course->courseEnd));?></td>
											<td>周数：</td>
											<td width="80px"><?php echo $course->getWeeks();?></td>
											<td width="80px"><?php echo ($course->courseType==CourseBean::$_COURSE)?"周课时：":"总场次：";?></td>
											<td><?php echo $course->unit;?></td>
											<td>总课酬：</td>
											<?php 
											$splits=explode("/", $attr);?>
											<td><?php echo $course->salary;if(isset($splits[0])) echo $splits[0];?></td>
										</tr>
										<?php if($course->courseType == CourseBean::$_LECTURE):?>
										<tr>
											<td>通知标题：</td>
											<td colspan="7"><?php echo $course->summaryTitle;?></td>
										</tr>
										<?php endif;?>
										<tr>
											<td>
												<?php echo ($course->courseType == CourseBean::$_COURSE)?"课程和主讲人介绍：":"通知和主讲人介绍："?>
											</td>
											<td colspan="7"><?php echo $course->summary;?></td>
										</tr>

									</table>
								</td>
								<td>
									<div style="WRITING-MODE: lr-tb" id="lian">
										<p>第一联院系联</p>
									</div>
								</td>
							</tr>
						</table>
		
		</form>
		<table width="800" border="0" cellpadding="5">
			<tr>
				<td nowrap="nowrap">
					<p>
						<span class="font_foot STYLE7">院系负责人（公章）：___________</span>
					</p>
				</td>
				<td nowrap="nowrap">
					<p>
						<span class="font_foot STYLE7">教务处审核人（公章）：____________</span>
					</p>
				</td>
				<?php if($course->teacherType==3):?>
				<td nowrap="nowrap"><p>
						<span class="font_foot STYLE7">国际处审核人（公章）：____________</span>
					</p></td>
				<?php endif;?>
			</tr>
			<tr>
				<td nowrap="nowrap"><p>
						<span class="font_foot STYLE7">财务处审核（公章）：____________</span>
					</p></td>
			</tr>
		</table>
	</div>
<?php endif;?>
</body>
</html>